<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

// task one
Route::get('/', function(){
    return json(['hello' => 'world']);
});
// task two
Route::get('cmd','index/runCmd')->append(['start_date' => '2018-10-01', 'end_date' => '2021-10-01', 'api_key' => 'h71cy1KLIXqb9mmt5mx6SRRc5XsiS3vVlK9YODfP']);
// task four
Route::get('neo/hazardous','index/hazardous');
// task five
Route::get('neo/fastest', 'index/fastest');
// task six
Route::get('neo/best-year', 'index/bestYear');
// task seven
Route::get('neo/best-month', 'index/bestMonth');
// forbiden other url
Route::miss(function() {
    return '404 Not Found!';
});